﻿@model Pro260Website.Models.ListingViewModel<Domain.Entity.Platform>
@{
    ViewBag.Title = "Platforms";
}


    <h1 class="title @Html.GetColor(Request.Cookies["color"])">Platforms</h1>

<br />

<div id="titlelessItem" style="float: right">
    <div class = "item roundTextBox @Html.GetColor(Request.Cookies["color"])">
        @using (Html.BeginForm("Listings", "Platform"))
        {
            <input type="text" name="SearchField"/>
            <input type="submit" value="Search" class = "actionButtons @Html.GetColor(Request.Cookies["color"])"/>
        }
        </div>
</div>
<br/><br/><br/><br/><br/><br/>
<table style="text-align: center" class="defaultGrey">
    <tr class="tHeader @Html.GetColor(Request.Cookies["color"])">
        <th>Name</th>
        <th>Release Year</th>
        <th>Generation</th>
        @*<th>Developer</th>*@
    </tr>
    @foreach (var p in Model.Items)
    {
        <tr>
            <td>@Html.ActionLink(p.Name, "Platform", new { p.PlatformID }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })</td>
            <td>@p.YearReleased</td>
            <td>@p.Generation</td>
            @*<td>@p.Developer</td>*@
        </tr>
    }
    
</table>
<br/><br/>
<div id="pagerForm" class="pager @Html.GetColor(Request.Cookies["color"])">
    @Html.PageLinks(Model.PagingInfo, i => Url.Action("Listings", "Platform", new { SearchField = Model.QueryInfo.QueryString, page = i, pageSize = Model.PagingInfo.ItemsPerPage }))
</div>
<br/>
